//
#import "BKCFType.h"
#import "BKFramework.h"
#import "BKSignatures.h"

@implementation BKCFType

- (id) initWithXMLElement: (NSXMLElement*) elem signatures: (BKSignatures*) sigs
{
	if(self = [super initWithXMLElement: elem signatures: sigs])
	{
		NSXMLNode* theNode = [elem attributeForName: @"tollfree"];
		if(theNode)
			self.tollfree = [theNode stringValue];
		
		theNode = [elem attributeForName: @"gettypeid_func"];
		if(theNode)
			self.getTypeIDFunc = (BKCFGetTypeIDFunc) CFBundleGetFunctionPointerForName(
				sigs.framework.bundle, 
				(CFStringRef) [theNode stringValue]);
	}
	return self;
}

@synthesize tollfree = _tollfree;
@synthesize getTypeIDFunc = _getTypeIDFunc;

@end
